package org.dtrd.modules.common.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.dtrd.modules.archive.entity.po.DtrdEntRdArchivePhysical;
import org.dtrd.modules.flup.entity.bean.FlupRecord;
import org.dtrd.modules.content.tags.entity.bean.TagDetail;

import java.time.LocalDate;
import java.util.List;

/**
 * @author qr
 * @date 2021/12/22 13:23
 */
@ApiModel("患者列表信息")
@Data
public class PatientListInfo {

    @ApiModelProperty("患者id")
    private Integer patientId;

    @ApiModelProperty("医生id")
    private Integer doctorId;

    @ApiModelProperty("分组id")
    private Integer groupId;

    @ApiModelProperty("患者标签名字列表")
    private List<TagDetail> tags;

    @ApiModelProperty("机构编码")
    private String orgCode;

    @ApiModelProperty("身高")
    private Float height;

    @ApiModelProperty("体重")
    private Float weight;

    @ApiModelProperty("复诊状态, 0-未预约, 1-待复诊, 2-已复诊, 3-未复诊, 4-复诊中, 5-未预约")
    private Integer status;

    @ApiModelProperty("患者姓名")
    private String patientsName;

    @ApiModelProperty("患者性别")
    private Integer patientsSex;

    @ApiModelProperty("生日")
    private LocalDate patientsBirthday;

    @ApiModelProperty("手机号")
    private String patientsMobile;

    @ApiModelProperty("头像")
    private String patientsImg;

    @ApiModelProperty("住址")
    private String patientsAddress;

    @ApiModelProperty("描述")
    private String patientsDescription;

    @ApiModelProperty("预约记录对象")
    private FlupRecord appointmentRecord;

    @ApiModelProperty("注册事件")
    private String createTime;

    public PatientListInfo parseFromPO(DtrdEntRdArchivePhysical physical) {
        height = physical.getHeight();
        weight = physical.getWeight();
        return this;
    }
}
